package com.bykj.property.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.bykj.property.controller.vo.request.SysUserNSysRolePageRequest;
import com.bykj.property.model.SysUserNSysRole;
    import com.bykj.property.model.SysUserNSysRole;
    import org.apache.ibatis.annotations.*;
    import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.FetchType;

/**
* <p>
    * 用户角色关系 Mapper 接口
    * </p>
*
* @author liangyiming
* @since 2019-06-20
*/
public interface SysUserNSysRoleMapper extends BaseMapper<SysUserNSysRole> {


        @Select("select  * from sys_user")
        @Results({
                @Result(property = "sysUserId",column = "sys_user_id"),
        @Result(property = "sysUser",column = "sys_user_id",many = @Many(select = "com.bykj.property.mapper.SysRoleMapper.selectById"))
        }
        )
        Page<SysUserNSysRole> queryPage(SysUserNSysRolePageRequest pageRequest);
        @Select("select  * from sys_user")
        @Results({
        @Result(property = "sysUser",column = "sys_user_id",many = @Many(select = "com.bykj.property.mapper.SysRoleMapper.selectById"))
        }
        )
        List<SysUserNSysRole> queryList(SysUserNSysRole model);

}